<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../libs/vue.js"></script>
</head>

<body>
    <div id="app">
        <div :class="class1"></div>
        <!-- 数组写法 -->
        <div :class="[class1,class2]"></div>
        <!-- 对象写法 -->
        <div :class="{box1:true,box2:false}"></div>
    </div>
    <script>
        let vm = new Vue({
            el: '#app',
            data:{
                class1:'box1',
                class2:'box2',
            }
        })
    </script>
</body>

</html>